package com.wfuhui.modules.api.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.wfuhui.common.utils.R;
import com.wfuhui.modules.api.annotation.AuthIgnore;
import com.wfuhui.modules.oms.entity.BannerEntity;
import com.wfuhui.modules.oms.service.BannerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@RestController
@RequestMapping("/api/banner/")
@Api("Banner接口")
public class ApiBannerController {
	
	@Autowired
	private BannerService bannerService;
	
    @AuthIgnore
    @GetMapping("list")
    @ApiOperation(value = "获取Banner信息")
    public R list(){
    	List<BannerEntity> bannerList = bannerService.queryList(null);
        return R.ok().put("bannerList", bannerList);
    }
}
